package biz;

import dao.PersonalCenterDao;

public class PersonalBiz {
    private PersonalCenterDao dao = new PersonalCenterDao();

    // 用户 修改数据判断
    public int modifyUser(String uname, String phone,String email,String uid) throws BizException {

        if ("".equals(uname.trim()) || uname == null){
            throw new BizException("用户名不能为空！");
        }

        if (phone.length()==13 && phone.trim().length() ==13){
            throw new BizException("电话号码必须为13位！");
        }

        if ("".equals(email.trim()) || email == null){
            throw new BizException("邮箱不能为空！");
        }

        return dao.modifyUser(uname,phone,email,uid);

    }
}
